﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Zz
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string name = this.textBox1.Text;
            string pass = this.textBox2.Text;

            
            
            //非空验证
            if (this.textBox1.Text!=""&&this.textBox2.Text!="")
            {
                string sql = string.Format("insert lin(Name,passWord)select '{0}','{1}'", name,pass);
                bool dr = DBHelper1.Ng(sql);
                if (dr==true)
                {
                    MessageBox.Show("添加成功！");
                    
                }
            }
            else
            {

            }
            






        }
    }
}
